<!--{template ADMIN_DIRECTORY/tpl/admin_header}-->

<div class="page_title"><h1>{$_lang['enterprise_auth_list']}</h1></div>
<!--页头结束-->


<div class="box search p_relative">
	<div class="control">
   <a href="javascript:d();"><b>&times;</b></a>
	</div>
	<div class="title"><h2>{$_lang['search']}</h2></div>
	<div class="detail" id="detail">
	 <form method="post" action="{$url}" id="frm_art_search">
		<table cellspacing="0" cellpadding="0">
			<tbody>
				<tr>
					<th>{$_lang['auth_num']}</th>
					<td><input type="text" class="txt" name="w[enterprise_auth_id]" 	value="{$w[enterprise_auth_id]}" onkeyup="clearstr(this);"></td>
					<th>{$_lang['auth_user']}</th>
					<td><input type="text" class="txt" name='w[username]' value="{$w[username]}"></td>
				</tr>
				<tr>
					<th>{$_lang['auth_status']}</th>
					<td>
						<select name="w[auth_status]">
						 <option value="">{$_lang['select_all']}</option>
						 <option value="1" {if $w[auth_status]=='1'} selected="selected" {/if}>{$_lang['passed']}</option>
						 <option value="2" {if $w[auth_status]=='2'} selected="selected" {/if}>{$_lang['nopassed']}</option>
						 <option value="0" {if $w[auth_status]==='0'} selected="selected" {/if}>{$_lang['wait_audit']}</option>
						</select>
					</td>
					<th>{$_lang['list_result']}</th>
					<td>
						<select name="w[page_size]">
						<option value="10" {if $w[page_size]=='10'}selected="selected"{/if}>{$_lang['page_size']}10</option>
						<option value="20" {if $w[page_size]=='20'}selected="selected"{/if}>{$_lang['page_size']}20</option>
						<option value="30" {if $w[page_size]=='30'}selected="selected"{/if}>{$_lang['page_size']}30</option>
						</select>
						<button class="pill" type="submit" value="{$_lang['search']}" name="sbt_search"><span class="icon magnifier">&nbsp;</span>{$_lang['search']}</button>
				   </td>
				</tr>
			</tbody>
		</table>
		</form>
	</div>
</div>
<!--搜索结束-->


<div class="box list">
    	<div class="title"><h2>{$_lang['enterprise_auth_list']}</h2></div>
        <div class="detail">
        <form action="{$url}" id='frm_list' method="post">
        	<div id="ajax_dom">
	<input type="hidden" value="{$page}" name="page" />
        <table cellspacing="0" cellpadding="0">
         <tbody>
          <tr>
          	<th ><input type="checkbox" id="checkbox" onclick="checkall();">{$_lang['id']}</th>

            <th>{$_lang['username']}</th>
			<th>{$_lang['register_num']}</th>
			<th>{$_lang['licence_pic']}</th>
			<!--<th>{$_lang['cash']}</th>-->
			<th>{$_lang['validity']}</th>
			<th>{$_lang['auth_status']}</th>
			<!--<th>{$_lang['operate']}</th>-->
          </tr>
		  {loop $enterprise_arr $v}
		<tr class="item">
			<td><input type="checkbox" name="ckb[]" id="cbk_selected" value="{$v[enterprise_auth_id]}">{$v[enterprise_auth_id]}</td>

			<td>{$v[username]}</td>
			<td>{$v[licen_num]}</td>
			<td><a target="_blank" href="../{$v[licen_pic]}"><img src="../{$v[licen_pic]}" width="40" height="40"></a></td>

			<!--<td><font color="#ff7700">{$_lang['free']}</font></td>-->
			<td>{if $v[start_time]==$v[end_time]}{$_lang['lifetime_validity']}{else}<!--{date('Y-m-d',$v[start_time])}-->{$_lang['to']}<!--{date('Y-m-d',$v[end_time])}-->{/if}</td>
			<td>
				{if $v[auth_status]==1}
					<font color="green">{$_lang['passed']}</font>
				{elseif $v[auth_status]==2}
					<font color="red">{$_lang['nopassed']}</font>
				{else}
					{$_lang['wait_audit']}
				{/if}
				{if $v[auth_status]==0||$v[auth_status]==2}
					<a  class="button dbl_target" href="index.php?do={$do}&view={$view}&code=$code&ac=pass&enterprise_auth_id={$v[enterprise_auth_id]}&obj=$v[username]" 	onclick="return cdel(this,'{$_lang[confirm_pass]}')"><span class="check icon"></span>{$_lang['pass']}</a>
				{/if}
				{if $v[auth_status]==0}
					<a  class="button" href=javascript:lookinfo("index.php?do={$do}&view={$view}&code=$code&ac=not_pass&enterprise_auth_id={$v[enterprise_auth_id]}&obj=$v[username]&uid={$v[uid]}"); ><span class="cross icon"></span>{$_lang['nopass']}</a>
					<!-- <a  class="button" href="index.php?do={$do}&view={$view}&code=$code&ac=not_pass&enterprise_auth_id={$v[enterprise_auth_id]}&obj=$v[username]" onclick="return cdel(this,'{$_lang[confirm_nopass]}')"><span class="cross icon"></span>11{$_lang['nopass']}</a> -->
				{/if}
				{if $v[auth_status]!=1}
					<a class="button" href="index.php?do={$do}&view={$view}&code=$code&ac=del&enterprise_auth_id={$v[enterprise_auth_id]}&obj=$v[username]" onclick="return cdel(this)"><span class="trash icon"></span>{$_lang['delete']}</a>
				{/if}
					</td>
		</tr>
		{/loop}
          <tr>
            <td colspan="7">

				<label for="checkbox">{$_lang['select_all']}</label>
				<input type="hidden" name="sbt_action" class="sbt_action" />
				<button type="submit" name="sbt_action" value="{$_lang['mulit_pass']}"   class="pill positive button" onclick="return batch_act(this,'frm_list');"><span class="icon check"> </span>{$_lang['mulit_pass']}</button>
				<button type="submit" name="sbt_action" value="{$_lang['mulit_nopass']}" class="pill button" onclick="return batch_act(this,'frm_list');"><span class="cross icon"></span>{$_lang['mulit_nopass']}</button>
				<button type="submit" name="sbt_action" value="{$_lang['mulit_delete']}"   class="pill negative" onclick="return batch_act(this,'frm_list');"><span class="icon trash"></span>{$_lang['mulit_delete']}</button>

			</td>
          </tr>
		  </tbody>
        </table>
		<div class="page">{$pages[page]}</div>
		</div>
		</form>
        </div>
</div>
<!--书体结束-->
<script language="javascript">
function d()
{
		$("#frm_art_search").slideToggle('800');
}
</script>
<script type="text/javascript">
function lookinfo(url){
	art.dialog.open(url,{
		title:"审核不通过的原因",
		height:400,
		width:600,
		closeFn:function (){
					var ispass=art.dialog.data('ispass');
					var reason = art.dialog.data('reason');
					var username = art.dialog.data('username');
					var title = art.dialog.data('title');
					if(ispass==1){
						 window.location=url+'&is_submit=1'+'&reason='+reason+'&name='+username+'&title='+title; 
					}
			}
		},false);
}
</script>
<!--{template ADMIN_DIRECTORY/tpl/admin_footer}-->